#ifndef __LINE_H__
#define __LINE_H__
/////////////////
//include
/////////////////
#include"CollisionObject.h"
#include"../CXBurst/Math.h"
#include"Box.h"
#include"Sphere.h"
/////////////////
//const
/////////////////

/////////////////
//class
/////////////////
class Line : public CollisionObject
{
public:
	Line(const Vector3D& start  = Vector3D(),const	Vector3D& end = Vector3D());
	~Line();
	Vector3D Collision(const Line&  Line);
	CollInfo Collision(Triangle* tri);
	CollInfo Collision(CollisionObject* coll);
	Vector3D GetVector()const	{return end - start;}
	Vector3D GetDirection()const{return CXBurst::IsZeroFloat(GetVector().Length(),3) ? Vector3D() : GetVector().Normalize();}
	float	GetLength()const	{return GetVector().Length();}
	Box GetBox();
	Sphere GetSphere();
	Vector3D start;
	Vector3D end;
};
#endif __LINE_H__
